#ifndef REARRANGEMENT_MAP_
#define REARRANGEMENT_MAP_

// Copyright 2013, Egor Dolzhenko
//
// This file is part of rearrangement-toolkit.
//
// Rearrangement-toolkit is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Rearrangement-toolkit is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rearrangement-toolkit.  If not, see <http://www.gnu.org/licenses/>.

#include <QList>
#include <QVariant>

class TreeItem
{
public:
  TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
  ~TreeItem();

  void appendChild(TreeItem *child);

  TreeItem *child(int row);
  int childCount() const;
  int columnCount() const;
  QVariant data(int column) const;
  int row() const;
  TreeItem *parent();

private:
  QList<TreeItem*> childItems;
  QList<QVariant> itemData;
  TreeItem *parentItem;
};

#endif //REARRANGEMENT_MAP_
